#pragma once

#include <QWidget>
namespace Ui{
    class Toast;
}

class Toast : public QWidget
{
    Q_OBJECT

public:
    Toast(QWidget *parent = Q_NULLPTR);
    ~Toast();

    void setText(const QString& text);
    void showAnimation(int timeout = 2000);

    static void showTip(const QString& text, QWidget* parent = nullptr);

protected:
    virtual void paintEvent(QPaintEvent *event);

private:
    Ui::Toast *ui;
};
